<?php

/**
 * Local Configuration Override
 *
 * This configuration override file is for overriding environment-specific and
 * security-sensitive configuration information. Copy this file without the
 * .dist extension at the end and populate values as needed.
 *
 * @NOTE: This file is ignored from Git by default with the .gitignore included
 * in ZendSkeletonApplication. This is a good practice, as it prevents sensitive
 * credentials from accidentally being committed into version control.
 */
return array(
    'db' => array(// 数据库配置
        'driver' => 'pdo_mysql',
        'host' => '127.0.0.1',
        'username' => 'root',
        'password' => '1234',
        'dbname' => 'web',
        'driver_options' => array(
            PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES \'UTF8\''
        ),
    ),
    'log' => array(// 日志配置
        'writers' => array(
            array(
                'name' => 'stream',
                'priority' => 4,
                'options' => array(
                    'mode' => 'a',
                    'stream' => 'D:/wamp/www/demo/web/log.txt', // 日志路径
                ),
            ),
        ),
    ),
    'session' => array(// session 配置
        'config' => array(
            'class' => 'Zend\Session\Config\SessionConfig',
            'options' => array(
                //'cookie_domain' => '/',
                //'cookie_httponly' => false,
                'cookie_lifetime' => 1200,
                'cookie_path' => '/',
                'cookie_secure' => false,
                //'name' => 'xiaomaimai',
                'remember_me_seconds' => 1200,
                //'save_path' => 'data/session',
                'use_cookies' => true,
                'cache_expire' => '1200',
            //'entropy_length' => '1024',
            //'entropy_file' => 'data/entropy',
            //'gc_maxlifetime'=>'',
            //'gc_divisor'=>'',
            //'gc_probability'=>'',
            //'hash_bits_per_character' => 1,
            //	'cache_limiter'=>'1',
            //	'hash_function'=>'1',
            //	'php_save_handler'=>'php',
            //	'serialize_handler'=>'1',
            //	'url_rewriter_tags'=>'1',
            //	'use_trans_sid'=>true,
            ),
        ),
        'storage' => 'Zend\Session\Storage\SessionArrayStorage',
        'validators' => array(
            'Zend\Session\Validator\RemoteAddr',
            'Zend\Session\Validator\HttpUserAgent',
        ),
    ),
);
